package com.englisheveryday.dao;

import java.util.Date;

import org.springframework.jdbc.core.JdbcTemplate;

import com.englisheveryday.consants.SQLConstants;
import com.englisheveryday.util.UUIDGenerator;

/**
 * <pre>
 *    
 * </pre>
 * @author 马永华
 * @date 2012-9-16 上午10:59:54
 * @version 1.1
 */
@SuppressWarnings("unchecked")
public class ChangeListDAO {

   private JdbcTemplate jdbcTemplate;
	
	public ChangeListDAO(JdbcTemplate jdbcTemplate){
		this.jdbcTemplate = jdbcTemplate;
	}
	
	//保存每日口语更新日志
	public int save_articlechangelist(String dataid,String type){
		return jdbcTemplate.update(SQLConstants.changelist_article_save, new Object[]{
				UUIDGenerator.generate(),
				dataid,
				type,
				new Date().getTime()
		});
	}
	
	public int save_categorychangelist(String dataid,String type){
		return jdbcTemplate.update(SQLConstants.changelist_category_save, new Object[]{
				UUIDGenerator.generate(),
				dataid,
				type,
				new Date().getTime()
		});
	}
}

